package com.library.control.log;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import com.library.model.dto.notice.NoticeDTO;
import com.library.model.service.NoticeService;

public class NoticeBoardListController extends AbstractController {
	
	private NoticeService noticeservice;
	
	public void setNoticeservice(NoticeService noticeservice) {
		this.noticeservice = noticeservice;
	}


	protected ModelAndView handleRequestInternal(
			HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mav=new ModelAndView();
		List<NoticeDTO> noticelists=noticeservice.getAllNotice();
		mav.addObject("noticess", noticelists);
		mav.setViewName("noticeboardlist");
		return mav;
	}//




	

}
